#include <iostream>
#include "command.h"

//客户端测试
int main(int argv, char**argc)
{
	printf("************  test hello zc!!!   **************\n");
    /* add test code! */
	// 接收者电视机 
	shared_ptr<Television> tv = make_shared<Television>();
	
	// 命令 
	shared_ptr<AbstractCommand> openCommand = make_shared<TVOpenCommand>(tv);
	shared_ptr<AbstractCommand> closeCommand = make_shared<TVCloseCommand>(tv);
	shared_ptr<AbstractCommand> changeCommand = make_shared<TVChangeCommand>(tv);
	
	// 调用者
	shared_ptr<Controller> controll = make_shared<Controller>(openCommand,closeCommand,changeCommand);
	
	// 测试 
	controll->open();
	controll->change();
	controll->close();
	
	return 0;
}